#include <vector>
#include <unordered_set>

using namespace std;

class Solution {
public:
    bool containsDuplicate(vector<int>& nums) {
        unordered_set<int> map;
        for (int num : nums) {
            if (map.count(num) == 1) {
                return true;
            }
            map.insert(num);
        }
        return false;
    }
};
